/**
 * Proyecto: Cognitum
 * Global IT Services 2008
 * @author Mislas
 */
Cognitum.MesaDeControl.Poliza.Entity = function(){
    if (LOG.isDebugEnabled()) {
        LOG.debug('[MesaDeControl.Poliza.Entity.ctor] <-');
    }
    Cognitum.MesaDeControl.Poliza.Entity.superclass.constructor.call(this);
}

Ext.extend(Cognitum.MesaDeControl.Poliza.Entity, Cognitum.Polizas.General.Entity, {
    id: 'PolizasPendientes.Entity',
    name: 'Polizas Pendientes',
    searchlist: {
        sortings: ['Folio'],
        views: [{
            Id: 0,
            Nombre: 'Normal',
            Template: null
        }],
        previewTemplate: null,
        getMenuActions: function() {
            if(!this.submenus) {
                this.submenus = [this.openMenuAction = new Ext.menu.Item({
                    iconCls:'icon-window',
                    text:'Abrir...',
                    scope: this,
                    handler:function(){
                        var grid = Ext.getCmp(this.getId() + '-grid');
                        var selected = grid.getSelectionModel().getSelected();
                        this.openRecord(selected.get('Id'));
                    }
                })];
            }
            return this.submenus;
        },
        getTBarCustomControls: function(){
            return ['->', ' '];
        }
    }
});

Cognitum.PolizasPendientes = Cognitum.MesaDeControl.Poliza.Entity;
